package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	counts := make(map[string]int)
	input := bufio.NewScanner(os.Stdin)
	for input.Scan() {
		newstr := input.Text()
		if newstr == "exit" {
			break
		}
		counts[newstr] = counts[newstr] + 1
	}

	for str, count := range counts {
		fmt.Printf("str:%s, count:%d\n", str, count)
	}
}
